<?php

// 引入人脸检测Face SDK
require_once '../AipFace.php';

// 定义常量
const APP_ID = '9218353';
const API_KEY = 'kDfq3ZvDTKeKtEllE69t0ueh';
const SECRET_KEY = 'v0OqIcBBnmo7vOAPPpy3bDKKqAGj5RKc';

// 初始化
$aipFace = new AipFace(APP_ID, API_KEY, SECRET_KEY);

//人脸检测 获取所有属性
var_dump($aipFace->detect(file_get_contents('face.jpg'), array(
    'face_fields' => 'age,beauty,expression,faceshape,gender,glasses,landmark,race,qualities',
)));
